package at.ac.tuwien.swa075.telco.smsc.dao;

import java.sql.Timestamp;
import java.util.List;


public interface IMessageDAO {

	public abstract boolean deleteMessage(String messageId);

	/**
	 * Finds a message by recipient
	 * @param code The recipients network code
	 * @param number The recipients phone number
	 * @return Returns a list containing all messages  
	 */
	public abstract List<MessageTO> selectMessagesByRecipient(String code,
			String number);

	/**
	 * Finds a message by sender
	 * @param code The senders network code
	 * @param number The senders phone number
	 * @return
	 */
	public abstract List<MessageTO> selectMessagesBySender(String code,
			String number);

	/**
	 * Inserts a message transfer object.
	 * @param message The transfer object
	 * @return Returns the message number that has been allocated for this message.
	 */
	public abstract String insertMessage(MessageTO message);

	public abstract List<MessageTO> selectMessages(String senderCode,
			String senderNumber, String recipientCode, String recipientNumber,
			MessageStatus status, Timestamp from, Timestamp to);

	public abstract boolean updateMessage(MessageTO message);

}